package com.elective.courseselect.entity;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lee
 * @date 2021年10月24日 12:08
 */
@Data
@TableName("schedule")
public class ScheduleEntity implements Serializable {
    private static final long serialVersionUID = 1L;


    @TableId(type = IdType.AUTO)
    private Integer id;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prepareTimeStart ;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prepareTimeEnd ;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date selectTimeStart ;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date selectTimeEnd ;

    @Override
    public String toString() {
        return "ScheduleEntity{" +
                "id=" + id +
                ", prepareTimeStart=" + DateUtil.date(prepareTimeStart) +
                ", prepareTimeEnd=" + DateUtil.date(prepareTimeEnd) +
                ", selectTimeStart=" + DateUtil.date(selectTimeStart) +
                ", selectTimeEnd=" + DateUtil.date(selectTimeEnd) +
                '}';
    }
}
